package com.ccz.demo.design.state.event;

import com.ccz.demo.design.state.AbstractStatus;
import com.ccz.demo.design.state.ActivityService;
import com.ccz.demo.design.state.ActivityStatus;
import com.ccz.demo.design.state.Result;

public class RefuseStatus extends AbstractStatus {
    @Override
    public Result checkPass(String id, Enum<ActivityStatus> currentStatus) {
        return new Result("-1", "不可重复通过活动");
    }

    @Override
    public Result checkRefuse(String id, Enum<ActivityStatus> currentStatus) {
        return new Result("-1", "不可重复通过活动");
    }

    @Override
    public Result activityFinish(String id, Enum<ActivityStatus> currentStatus) {
        return new Result("-1", "拒绝活动仅能取消");
    }

    @Override
    public Result activityCancel(String id, Enum<ActivityStatus> currentStatus) {
        ActivityService.execStatus(id, currentStatus, ActivityStatus.CANCEL);
        return new Result("0", "活动取消");
    }
}
